#include<bits/stdc++.h>
using namespace std;
int n;
int h[100009];
int x;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>x;
        h[x]++;
    }
    int ans=n;
    int low=0;
    for(int i=1;i<=100000;i++){
        if(!h[i])continue;
        if(low==0){
            low+=h[i];
        }else{
            ans-=min(h[i],low);
            low=max(low-h[i],0);
            low+=h[i];
        }
    }
    cout<<ans;
}
